<template>
    <div>
        <Result @pushId="getId"></Result>
  </div>
</template>

<script>

import Result from '@/components/Result.vue'
export default {
  data(){
    return{
      songName:'',
      current:{
        mvid:'',
        id:''
      }
    }
  },
  components: { Result },
  
  beforeRouteLeave(to,from,next){
    // 限制 未确认查看某首歌时 无法进行其他直接的歌曲播放、mv播放、和歌曲评论查看操作
   if(to.path === '/player/' || to.path === '/video/' || to.path === '/comment/&type=0' ) {
    alert('当前您未知您想查看的歌曲，请在歌曲列表进行单曲操作')
    return
   }

   next()
  },
  methods:{
    getId(id){
      //歌曲id和mvid 传递2
      this.$emit('keepId',id)
      // console.log('FResult')
    }
  }
}
</script>

<style>

</style>